#pragma once
#include "SSL_Client.hpp"
#include <boost/beast/http.hpp>
//请求基类
template <typename bodyType>
class Base_Https_Request
{
protected:
    Base_Https_Request
    (
        boost::asio::io_context& io_context,
        ssl::context& context,
        const std::string& server,
        const std::string& port
    ) :
        client(io_context, context, server, port),
        req()
    { }
    //ssl客户端
    SSL_Client client;
    boost::beast::http::request<bodyType> req;

public:
    //初始化http请求
    virtual void inithttp() = 0;
    //收发接口
    virtual void send(std::string str) = 0;
    virtual std::string recv() = 0;
};